package com.mine.modules.vm.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.util.List;

import com.mine.common.annotation.vm.TreeChildrenAnnotation;
import com.mine.common.annotation.vm.TreeIdAnnotation;
import com.mine.common.annotation.vm.TreeParentIdAnnotation;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 监控设备区域表
 * </p>
 *
 * @author xujf
 * @since 2024-09-22
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("vm_monitor_regions")
@ApiModel(value="监控区域对象", description="监控设备区域表")
public class VmMonitorRegions implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "index_code", type = IdType.ASSIGN_ID)
    @TreeIdAnnotation("indexCode")
    @ApiModelProperty(value = "区域唯一标识码")
    private String indexCode;

    @ApiModelProperty(value = "父区域唯一标识码")
    @TreeParentIdAnnotation("parentIndexCode")
    private String parentIndexCode;

    @ApiModelProperty(value = "树编号")
    private String treeCode;

    @ApiModelProperty(value = "区域名称")
    private String name;

    @ApiModelProperty(value = "区域标识")
    private String command;

    @ApiModelProperty(value = "区域标识")
    @TableField("region_id")
    private String regionId;

    @TableField(exist = false)
    @TreeChildrenAnnotation("children")
    private List<VmPermission> children;

}
